/*
 * Copyright (c) 2023 Cshoo Org. All Rights Reserved.
 */

package org.cshoo.tattoo.authorize.domain.repository;

import org.cshoo.tattoo.authorize.domain.po.RoleMenuRelation;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.repository.CrudRepository;

import javax.transaction.Transactional;

/**
 * @author 杨翼
 * @since 1.0
 */
public interface IRoleMenuRelationRepository extends CrudRepository<RoleMenuRelation, Long> {

    /**
     * 删除角色菜单关系
     *
     * @param roleId 角色id
     * @param menuId 菜单id
     */
    @Modifying
    @Transactional
    void deleteByRoleIdAndMenuId(Long roleId, Long menuId);

}
